<?php
	include_once '../../Config/config.php';
	include_once '../../Config/conexion.php';
	include_once '../../Model/Pais.php';
	include_once '../../Model/Idioma.php';
	include_once '../../Model/Track.php';
	include_once '../../Model/Revisor.php';
	
	$Usuario = Usuario::Obtener($_POST["idusuario"]);
	
	$revisor =  Revisor::Obtener($_POST["idusuario"]);
	
	$tracks = explode(",",$revisor->Tracks);
	$idiomas = explode(",",$revisor->Idiomas);
?>
<style>
	.titulo-formulario{
		font-weight:bold;
	}
	
	label{
		margin-bottom:10px;
		font-weight:bold;
	}
</style>
<form name="frm" id="frm" action="proceso.php" class="frm" method="post">
<h1 style="text-align:center">
"Educaci&oacute;n Gerencial : Rompiendo Fronteras"
</h1>
<h2 style="text-align:center">Formulario para Revisores/ Reviewer Form</h2>
<input type="hidden" name="action" value="registrar">
<div class="grid_18 prefix_2 alpha omega">
		
		<div class="grid_18 alpha omega" style="text-align:left;margin-top:20px; margin-bottom:20px;">
			<label class="titulo-formulario" style="color:#940000">INFORMACI&Oacute;N PERSONAL/ PERSONAL INFORMATION</label>
		</div>
		
	
		<div class="grid_14 alpha campos">		
			<div class="grid_9 alpha">
				<label>Email</label>
				<br/>
				<?php echo $Usuario->Email?>
			</div>		
			<div class="grid_5  omega">
				<label>Pais</label>
				<br/>
				<?php echo Util::FormatoHtml($Usuario->Pais->Nombre) ?>
			</div>				
			<div class="clear"></div>
			<div class="grid_4 alpha">
				<label>Nombres</label>
				<br />
				<?php echo $Usuario->Nombres?>
			</div>
			<div class="grid_5">
				<label>Paterno</label>
				<br />
				<?php echo $Usuario->Paterno?>
			</div>
			<div class="grid_5 omega">
				<label>Materno</label>
				<br />
				<?php echo $Usuario->Materno?>
			</div>	
			<div class="clear"></div>
			<div class="grid_10 alpha omega">
				<label>Institucion</label>
				<br/>
				<?php echo Util::FormatoHtml($Usuario->Institucion->Nombre) ?>
			</div>		
			<div class="clear">
			</div>
			<!--
			<div class="grid_10 alpha omega">
				<label><input type="checkbox" name="esdeseorevisor" name="esdeseorevisor">Deseo ser Revisor</label>
			</div>
			<div class="clear">
			</div>
			<div class="grid_10 alpha omega">
				<label><input type="checkbox" name="esdeseopanelista" name="esdeseopanelista">Deseo ser Panelista</label>
			</div>
			-->
			<div class="grid_18 alpha omega" style="text-align:left;margin-top:20px;">
				<label class="titulo-formulario" style="color:#940000">
					BREVE RESE&Ntilde;A PROFESIONAL / BRIEF PROFESSIONAL INFORMATION
				</label>
				<br/>
				<?php
					echo $revisor->Resena;
				?>
			</div>				
			
			<div class="grid_18 alpha omega" style="text-align:left;margin-top:20px;">
				<label class="titulo-formulario" style="color:#940000">
					&Aacute;REA(S) DE INTER&Eacute;S / AREAS OF INTEREST
				</label>
				<br/>
				<label>Favor de seleccionar el &aacute;rea o &aacute;reas de inter&eacute;s / Please choose the &aacute;rea(s) of Interest</label>
				<br/>
				<?php $lista = Track::Listar();?>
				<ul style="text-align:left;list-style:none;">
				<?php				
					foreach($lista as $key => $value){
					
					$checked = "";
					if(in_array($value->Id, $tracks)){
						$checked = "checked = 'checked'";
					}					
				?>
				<li>
					<input type="checkbox" value="<?php echo $value->Id?>" name="idtrack[]" <?php echo $checked?> disabled="disabled">
					<span>
						<?php echo Util::FormatoHtml($value->Nombre)?>
					</span>
				</li>	
				<?php
					}
				?>
				</ul>
			</div>	
			
			
			<div class="grid_18 alpha omega" style="text-align:left;margin-top:20px;">
				<label class="titulo-formulario" style="color:#940000">IDIOMAS / LANGUAGES</label>
				<br/>
				<label>Favor de seleccionar el idioma o idiomas en los cuales puede hacer revisiones</label>
				<br/>
				<?php $lista = Idioma::Listar();?>
				<ul style="text-align:left;list-style:none;">
				<?php				
					foreach($lista as $key => $value){
					
					$checked = "";
					if(in_array($value->Id, $idiomas)){
						$checked = "checked = 'checked'";
					}					
				?>
				<li>
					<input type="checkbox" value="<?php echo $value->Id?>" name="ididioma[]" <?php echo $checked?> disabled="disabled">
					<span>
						<?php echo Util::FormatoHtml($value->Nombre)?>
					</span>
				</li>	
				<?php
					}
				?>
				</ul>
			</div>	
			
			<div class="clear">
			</div>
		</div>
 </div>
 </form>